<?php
	class Bank 
	{
		private $accounts=array();
		private $name;
		
		public function setBankName($name)
		{
			$this->name=$name;
		}
		
		public function addAccout($account, $iban)
		{
			$this->accounts[$iban]=$account;
		}
		
		public function getBankName()
		{
			return $this->name;
		}
		
		public function getAccount($iban)
		{
			return $this->accounts[$iban];
		}
		
		public function removeAccount($iban)
		{
			if(!array_key_exists($iban, $this->accounts))
			{
				echo "No such account<br>";
			}
			else 
			{
				unset($this->accounts[$iban]);
			}
		}
		
		public function getAll()
		{
			return $this->accounts;
		}
		
		public function withdraw($iban, $sum)
		{
			if(!array_key_exists($iban, $this->getAll()))
			{
				echo "No such account in this bank!";
			}
			else 
			{
				$acc=$this->getAccount($iban);
				$acc->withdraw($sum);
			}
		}
	};
?>